# -*- coding: UTF-8 -*-
'''
@Project ：suanfa 
@File    ：03QuickSort.py
@IDE     ：PyCharm 
@Author  ：Wu
@Date    ：2023/12/19 15:49 
'''

List = [8,9,11,13,7,21,1,99,55,66,32,6,7]

def QuickSort(list):
    left_list = []
    right_list = []
    if len(list) <= 1:
        return list
    else:
        base_num = list[0]
        for i in list[1:]:
            if i <= base_num:
               left_list.append(i)
            else:
                right_list.append(i)
        return QuickSort(left_list) + [base_num] + QuickSort(right_list)
print(QuickSort(List))

if __name__ == '__main__':
    # print(List[1:])
    pass